<!DOCTYPE html>
  <title>Test FencedFrames Resize Lock</title>
  <script src="/resources/testharness.js"></script>
  <script src="/resources/testharnessreport.js"></script>
  <script src="resources/utils.js"></script>

  <body>

    <script>
      promise_test(async () => {
        const resize_lock_inner_page_is_ready_key =
          KEYS["resize_lock_inner_page_is_ready"];
        const resize_lock_resize_is_done_key =
          KEYS["resize_lock_resize_is_done"];
        const resize_lock_report_inner_dimensions_key =
          KEYS["resize_lock_report_inner_dimensions"];

        const frame = attachFencedFrame("resources/resize-lock-inner.html");

        await nextValueFromServer(resize_lock_inner_page_is_ready_key);

        frame.width = "444";
        frame.height = "444";

        writeValueToServer(resize_lock_resize_is_done_key,
                           "outer_page_attempted_resize");

        let result =
          await nextValueFromServer(resize_lock_report_inner_dimensions_key);
        assert_equals(result, "300x150",
                      "fenced frame dimensions should not be updated by " +
                      "parent page");

      }, "Test Resize Lock");
    </script>

  </body>
</html>